<include file="header" />
<body>
<div class="wraper margin-none">
    <div class="top">
        <a href="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
        <span class="pull-left">删除<if condition="$ips_id eq 9">商户<else/>寝室</if></span>
        <a href="javascript:;" class="pull-right text-right"></a>
    </div>
    <div class="container">
        <volist name="data" id="vo">
            <a href="javascript:void(0);"  class="lists del" data-floow="{BEESCRM:$vo.floow_id}">{BEESCRM:$vo.community_name} {BEESCRM:$vo.building_name} {BEESCRM:$vo.floor_name} {BEESCRM:$vo.room_name}
                <span class="iconfont icon-shanchu pull-right" ></span>
            </a>
        </volist>
    </div>
    <input type="hidden" id="ips_id" value="{BEESCRM:$ips_id}">
</div>
<include file="commonJS" />
<script>
	$(function(){
        $(document).on('click','.del',function(){
            var floowId = $(this).data('floow');
            var ips_id = $('#ips_id').val();
            $.layerconfirm('温馨提示：删除后将不可恢复',function(callback){
                if(callback==1){
                    drop();
                }
            })
            function drop(){
                $.ajax({
                    'url': "/base/ips/delEleRemind",
                    'data': {floow_id:floowId,ips_id:ips_id},
                    'dataType':'json',
                    'type': 'GET',
                    'async': true,
                    success: function(data){
                        if(data.status == 'S'){
                            $.layeralert('删除成功');
                        }else{
                            $.layeralert('error','删除失败');
                        }
                        reload();
                    }
                });
            }


        })
        //页面刷新
        function reload(){
            setTimeout('location.reload()',2000);
        }
	});

</script>
</body>
</html>